/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
 *
 */

import { TaskDetails } from '@ohos/hvigor';

import { OhosLogger } from '../../utils/log/ohos-logger.js';
import { TargetTaskService } from '../../tasks/service/target-task-service.js';
import { AbstractCompileArktsEvolution } from './asbtract/abstract-compile-arkts-evolution.js';

/**
 * 编译arkTS 2.0源码
 *
 * @since 2025/1/22
 */
export class OhosTestCompileArktsEvolution extends AbstractCompileArktsEvolution {
  _log: OhosLogger = OhosLogger.getLogger(OhosTestCompileArktsEvolution.name);

  constructor(taskService: TargetTaskService, taskDetails: TaskDetails) {
    super(taskService, taskDetails);
  }

  initTaskDepends() {}

  protected async doTaskAction() {
    const projectConfig = await this.buildProjectConfigEvolutionBuilder();
    console.log('projectConfig', projectConfig);
    await this.runBuild(projectConfig, this._log);
  }
}
